/*
 * Copyright (c) 2015 www.smarthome.com All rights reserved.
 * 本软件源代码版权归----所有,未经许可不得任意复制与传播.
 */
package com.smarthome.base.dao.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.smarthome.domain.bean.ShAccountFeature;
import com.smarthome.base.dao.base.BaseDaoImpl;
import com.smarthome.base.dao.ShAccountFeatureDao;

/**
 * ShAccountFeatureDao 实现类
 * @author KongXiangyu
 * @since 2015-09-07
 */
@Repository("shAccountFeatureDao")
public class ShAccountFeatureDaoImpl extends BaseDaoImpl<ShAccountFeature,Long> implements ShAccountFeatureDao {
	private final static String NAMESPACE = "com.smarthome.base.dao.ShAccountFeatureDao.";
	
	//返回本DAO命名空间,并添加statement
	public String getNameSpace(String statement) {
		return NAMESPACE + statement;
	}

	@Override
	public List<ShAccountFeature> queryFeaturesByAccountId(Long accountId) {
		Map<String, Object> map = new HashMap<String, Object>();
        map.put("orderField", "id");
        map.put("orderFieldType", "ASC");
        map.put("accountId", accountId);
		return this.selectList(getNameSpace("queryAccountFeaturesByAccountId"), map);
	}
		
}